-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement/md pair gaussian value check #1810
Enhancement/md pair gaussian value check #1810
Conversation
@joaander do you have any suggestions on how I can get the pre-commit.ci check to pass? As far as I can tell, I have ensured that my additions a) have no trailing whitespace and b) satisfy the yapf settings in |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, just a small fix in where the positive value is documented.
Co-authored-by: Tommy Waltmann <53307607+tommy-waltmann@users.noreply.github.com>
Co-authored-by: Tommy Waltmann <53307607+tommy-waltmann@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for working on this!
Description
I have modified the
TypeParameterDict
formd.pair.Gaussian
,md.pair.ExpandedGaussian
, andmd.pair.LJGaussian
so thatsigma
must be a positive real number. Correspondingly, I have updated docstrings and pytests to reflect the new requirement.Motivation and context
This change ensures that users cannot accidentally or mistakenly set
sigma
equal to 0 for any of the Gaussian-type pair potentials, since doing so would cause divide-by-zero errors during simulation execution.Resolves #1806
How has this been tested?
I have added new invalid parameter dictionaries to the constructor function
_invalid_params()
inhoomd/md/pytest/test_potential.py
.I have built the documentation using Sphinx and confirmed that the changes I made to the docstrings display properly.
Change log
Checklist:
sphinx-doc/credits.rst
) in the pull request source branch.